class Category {
  String? id;
  String? pid;
  List<Category>? children;
  String? name;
  String? description;
  String? count;
  String? cover;
  String? hotCover;
  factory Category.fromJson(Map<String, dynamic> json) {
    return Category(
      id: json['id'],
      pid: json['pid'],
      children: json['children']?.map<Category>((v) => Category.fromJson(v)).toList(),
      name: json['name'],
      description: json['description'],
      count: json['count'],
      cover: json['cover'],
      hotCover: json['hotCover'],
    );
  }
  Category({
    required this.id,
    required this.pid,
    required this.children,
    required this.name,
    required this.description,
    required this.count,
    required this.cover,
    required this.hotCover,
  });
}

class CategoryList {
  List<Category>? categories;

  CategoryList({required this.categories});

  CategoryList.fromJson(List< dynamic> json) {
    categories = json.map<Category>((v) => Category.fromJson(v)).toList();
    // print('Jieshu');
  }


}

